package com.javafactroy.kunlong.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import com.javafactroy.kunlong.data.entity.EmployeeApiEntity;
import com.javafactroy.kunlong.data.service.EmployeeService;
import web.data.com.javafactroy.kunlong.WebService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;


/**
*  @author raymond.lei@163.com
*  @date   2024-04-07 21:27:00

*/

@Slf4j
@RestController
@Api(tags="Employee")
@RequestMapping("/dbagent/Employee")
public class EmployeeWeb extends WebService<EmployeeApiEntity, EmployeeService> {
    // Logger log = (Logger) LoggerFactory.getILoggerFactory().getLogger("ROOT");

    @PostMapping(value = "/importData")
    public void importData(@RequestPart(value = "file") MultipartFile file) throws IOException {

        excelImportService.importData(file, EmployeeApiEntity.class);

    }

}

